public class Dog {
    public String name;
    public int age;
    public String color;
    //无参数的构造方法
    public Dog(){
        this.name=name;
        this.age=age;
        this.color=color;
    }
    //有参数的构造方法
    public Dog(int age,String name,String color){
        this.name=name;
        this.age=age;
        this.color=color;
    }
    public void eat(){
        System.out.println("吃饭");
    }
    public void sleep(){
        System.out.println("睡觉");
    }
    public void drink(){
        System.out.println("喝水");
    }

    public static void main(String[] args) {
        Dog dog=new Dog();
        Dog dog1=new Dog(10,"小黄","黄色");
    }
}
